<template>
    <div>
        首页
        <button @click="btn">btn</button>
        <div>{{'xx'|time}}</div>
        <div>{{gettVuex}}</div>
        <div>{{getU}}</div>
    </div>
</template>

<script>
    import transitionName from '@/mixin/transitionName'
    import {mapGetters} from 'vuex'
    export default {
        name:'index',
        mixins: [transitionName],
        data() {
            return {
                
            }
        },
        methods: {
            btn () {
                this.$bus.$emit('msg','我是eventBUs')
                this.$store.dispatch('mm', '++++++++++++++')
                this.$store.dispatch('user/userMM','pppppppppppppp')
            }
        },
        computed: {
            //获取modules下的getter方法，user是模块名称，getU是getter中的方法
            ...mapGetters('user',['getU']),
            ...mapGetters(['gettVuex']),

        }
    }
</script>

<style lang="scss" scoped>

</style>